package com.bigknow.appstore.web.base.interceptor;

import com.bigknow.appstore.web.base.service.IAuditLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by TwelveFoldEr on 2016/3/23.
 */
public class AuditLogHandlerInterceptor extends HandlerInterceptorAdapter {
//    private Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private IAuditLogService service;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
                             Object handler) throws Exception {
        return true;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response,
                           Object handler, ModelAndView modelAndView) throws Exception {
//        this.service.addByAop(request, response, handler, modelAndView);
    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response,
                                Object handler, Exception ex) throws Exception {
    }
}

